package com.andatsoft.laisim.utils;

import android.annotation.SuppressLint;

public class Animator {

	// //////////////////////////////////////////////////////
	//
	// Animation
	//
	// //////////////////////////////////////////////////////

	@SuppressLint("NewApi")
	public static void applyAlphaAnimation(Object target, long duration,
			com.nineoldandroids.animation.Animator.AnimatorListener event,
			float... param) {
		com.nineoldandroids.animation.ObjectAnimator oa = com.nineoldandroids.animation.ObjectAnimator
				.ofFloat(target, "alpha", param);
		oa.setDuration(duration);
		if (event != null)
			oa.addListener(event);
		oa.start();
	}
}
